home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 113
/
XENIATGM113.iso
/
Patch
/
No One Lives Forever
/
NOLFUpdate003.exe
/
Setup
/
Spanish
/
spanish.rul
< prev
next >
Wrap
Text File
|
2001-04-25
|
3KB
|
103 lines
//
// SPANISH UPDATE setup.rul
//
// NOTE: Changes made to this script should be made to the scripts for each
// other language too!
//
// Game & folder names
#define APP_TITLE "Actualizaci≤n de NOLF (v1.003)"
#define APP_NAME "No One Lives Forever"
#define APP_VERSION "1.0"
#define APP_KEY "NOLF.exe"
#define DEFAULT_PATH "Fox\\No One Lives Forever"
#define DEFAULT_GROUP "Fox Interactive\\No One Lives Forever"
#define UPDATE_VERSION "1.003"
#define UPDATE_COMMAND "-rez Nolfu003.rez -rez Nolfcres003.rez"
#define README_FILE "READMEU003.TXT"
declare
NUMBER nResult;
NUMBER nType, nSize;
STRING svSrcDir, svTargetDir;
STRING svRegKey;
STRING svTemp;
STRING svVersion;
program
start:
// Set paths
svSrcDir = SRCDIR ^ "..\\..\\";
// Setup screen & title
Enable(BACKGROUND);
SetColor(BACKGROUND, RGB(236, 164, 4));
SetTitle(APP_TITLE, 26, WHITE);
SetColor(STATUSBAR, BK_SOLIDBLUE);
PlaceBitmap(svSrcDir ^ "SETUP\\NOLF1.BMP", 1, CENTERED, CENTERED, CENTERED);
Delay(2);
// Get installed path from registry
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
svRegKey = "Software\\Monolith Productions\\" + APP_NAME + "\\" + APP_VERSION;
nType = REGDB_STRING;
nSize = -1;
nResult = RegDBGetKeyValueEx(svRegKey, "WorkingDirectory", nType, svTargetDir, nSize);
if (nResult < 0) then
svTemp = "No se ha podido actualizar " + APP_NAME + " a la versi≤n " + UPDATE_VERSION +
".\n\níAseg·rate de que " + APP_NAME + " estΘ instalado correctamente!";
MessageBox(svTemp, WARNING);
exit;
endif;
// Check version number of what's already installed
nType = REGDB_STRING;
nSize = -1;
nResult = RegDBGetKeyValueEx(svRegKey, "Version", nType, svVersion, nSize);
if (nResult = 0) then
nResult = StrCompare(svVersion, UPDATE_VERSION);
if (nResult > 0) then
svTemp = "La versi≤n que estßs ejecutando es la v" + svVersion + " del " + APP_NAME +
".\n\nNo puedes actualizarla a la v" + UPDATE_VERSION +
".\n\nPuedes descargar las ·ltimas actualizaciones del " + APP_NAME +
" en: http://www.the-operative.com";
MessageBox(svTemp, INFORMATION);
exit;
endif;
endif;
// Show status window
Disable(FEEDBACK_FULL);
Enable(STATUS);
Enable(INDVFILESTATUS);
PlaceWindow(STATUS, CENTERED, 0, LOWER_RIGHT);
SetStatusWindow(0, "Actualizando " + APP_NAME + "...");
// Copy all game files...
StatusUpdate(ON, 100);
SRCDIR = svSrcDir ^ "GAME";
TARGETDIR = svTargetDir;
CopyFile("*.*", "*.*");
// Copy language-specific files...
SRCDIR = svSrcDir ^ "GAME\\SPANISH";
CopyFile("*.*", "*.*");
// Display done message
SetStatusWindow(1000, "íActualizaci≤n completa!");
// Set new registry keys
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
RegDBSetKeyValueEx(svRegKey, "Version", REGDB_STRING, UPDATE_VERSION, -1);
RegDBSetKeyValueEx(svRegKey, "Update Command Line", REGDB_STRING, UPDATE_COMMAND, -1);
// Do the readme...
svTemp = "íSe ha completado la Actualizaci≤n del " + APP_NAME + "! ┐Te gustarφa leer el archivo README ahora?";
if (AskYesNo(svTemp, YES) = YES) then
LaunchAppAndWait("NOTEPAD.EXE " + svTargetDir ^ README_FILE, "", NOWAIT);
endif;
exit;